solve norm layer false negtive gap#16642
solve norm layer false negtive gap#16642Gasoonjia wants to merge 4 commits intogh/gasoonjia/102/basefrom
Conversation
When comparing AOT intermediate outputs with runtime, we believed that AOT and runtime should have same output for same operator. But if there're multiple intermediate outputs from a single operator / single operator blob, the statement may not correct. Like drop out, which only record output tensor during AOT, but in runtime we record both mask and output tensor. To support that, for 1 to many scenerio, instead of only take the last element for comparsion, we compare the runtime output sharing the same size and dtype with the aot one to have the best comparsion. Differential Revision: [D90790256](https://our.internmc.facebook.com/intern/diff/D90790256/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16642
Note: Links to docs will display an error until the docs builds have been completed. ❌ 7 New Failures, 3 Cancelled Jobs, 2 Unrelated FailuresAs of commit ccb1daf with merge base b46f6b5 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
When comparing AOT intermediate outputs with runtime, we believed that AOT and runtime should have same output for same operator. But if there're multiple intermediate outputs from a single operator / single operator blob, the statement may not correct. Like drop out, which only record output tensor during AOT, but in runtime we record both mask and output tensor. To support that, for 1 to many scenerio, instead of only take the last element for comparsion, we compare the runtime output sharing the same size and dtype with the aot one to have the best comparsion. Differential Revision: [D90790256](https://our.internmc.facebook.com/intern/diff/D90790256/) [ghstack-poisoned]
When comparing AOT intermediate outputs with runtime, we believed that AOT and runtime should have same output for same operator. But if there're multiple intermediate outputs from a single operator / single operator blob, the statement may not correct. Like drop out, which only record output tensor during AOT, but in runtime we record both mask and output tensor. To support that, for 1 to many scenerio, instead of only take the last element for comparsion, we compare the runtime output sharing the same size and dtype with the aot one to have the best comparsion. Differential Revision: [D90790256](https://our.internmc.facebook.com/intern/diff/D90790256/) [ghstack-poisoned]
When comparing AOT intermediate outputs with runtime, we believed that AOT and runtime should have same output for same operator. But if there're multiple intermediate outputs from a single operator / single operator blob, the statement may not correct. Like drop out, which only record output tensor during AOT, but in runtime we record both mask and output tensor. To support that, for 1 to many scenerio, instead of only take the last element for comparsion, we compare the runtime output sharing the same size and dtype with the aot one to have the best comparsion. Differential Revision: [D90790256](https://our.internmc.facebook.com/intern/diff/D90790256/) [ghstack-poisoned]
Pull Request resolved: #16642 When comparing AOT intermediate outputs with runtime, we believed that AOT and runtime should have same output for same operator. But if there're multiple intermediate outputs from a single operator / single operator blob, the statement may not correct. Like drop out, which only record output tensor during AOT, but in runtime we record both mask and output tensor. To support that, for 1 to many scenerio, instead of only take the last element for comparsion, we compare the runtime output sharing the same size and dtype with the aot one to have the best comparsion. ghstack-source-id: 334110504 @exported-using-ghexport Differential Revision: [D90790256](https://our.internmc.facebook.com/intern/diff/D90790256/)
There was a problem hiding this comment.
I don't fully follow why we can't capture all of the reference outputs for each op to avoid needing to heuristically match, as both portable ops and delegate calls should have matching signatures AOT and and at runtime, but I'm assuming we have a good reason. I'll approve to unblock.
| Returns: | ||
| The matching runtime output, or runtime_intermediate_output[-1] as fallback. | ||
| """ | ||
| # Find all runtime outputs that match the AOT shape |
There was a problem hiding this comment.
Is it practical to capture all of the outputs AOT so that we don't have to do this?
There was a problem hiding this comment.
We are capturing all outputs from both AOT and runtime, but their outputs do not always match each other.
Take dropout as example, AOT only generate the function output, but runtime generates two: mask and real output.
Stack from ghstack (oldest at bottom):
When comparing AOT intermediate outputs with runtime, we believed that AOT and runtime should have same output for same operator. But if there're multiple intermediate outputs from a single operator / single operator blob, the statement may not correct. Like drop out, which only record output tensor during AOT, but in runtime we record both mask and output tensor.
To support that, for 1 to many scenerio, instead of only take the last element for comparsion, we compare the runtime output sharing the same size and dtype with the aot one to have the best comparsion.
Differential Revision: D90790256